view_publish = jQuery.noConflict();

view_publish().ready(function() {
	if($("#edit-type option:selected").val() == 'contact_dir_form'){
		$('#edit-field-cont-desg-value-wrapper').show();
	}
	else{
		$('#edit-field-cont-desg-value-wrapper').hide();
	}
	$("#edit-type").on("change", function(event) { 
		var value = $("#edit-type option:selected").val();
	    if(value !== 'contact_dir_form'){
	    	$('#edit-field-cont-desg-value-wrapper').hide();
	    	$('#edit-field-cont-desg-value').val('');
	    }
	    else {
	    	$('#edit-field-cont-desg-value-wrapper').show();
	    }
	} );
});